package org.example.css.service.impl;

import org.example.css.service.CarService;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Service;

/**
 * 奔驰
 */
@Service
@Primary // 当一个接口存在多个实现类时,通过@Primary注解来指明哪个实现类作为首选进行自动装配注入
public class BenzCarServiceImpl implements CarService {

	@Override
	public String getColor() {
		return "Color: black";
	}

	@Override
	public String getBrand() {
		return "Brand: Benz";
	}
}
